package com.gigi.controller;

import com.alibaba.cola.dto.MultiResponse;
import com.alibaba.cola.dto.Response;
import com.gigi.entity.LikeCommentShiqinEntity;
import com.gigi.model.LikeCommentDO;
import com.gigi.model.ListFavoriteRequest;
import com.gigi.service.manual.LikeCommentManageService;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 点赞点踩评论管理
 */
@RestController
@RequestMapping("like-comment-manage")
public class LikeCommentManageController {

    private final LikeCommentManageService likeCommentManageService;

    public LikeCommentManageController(LikeCommentManageService likeCommentManageService) {
        this.likeCommentManageService = likeCommentManageService;
    }

    @ApiOperation(value = "列表")
    @PostMapping("/list")
    public MultiResponse<LikeCommentShiqinEntity> list(@RequestBody ListFavoriteRequest request) {
        return likeCommentManageService.list(request);
    }

    @ApiOperation(value = "点赞/点踩")
    @PostMapping("/change")
    public Response change(@RequestBody LikeCommentDO request) {
        return likeCommentManageService.change(request);
    }

}
